package com.library.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * 资源
 *
 * @author pig
 * @date 2023-10-31 14:34:33
 */
@Data
@TableName("resource")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "资源")
@NoArgsConstructor
@AllArgsConstructor
public class ResourceEntity extends Model<ResourceEntity> {

    private static final long serialVersionUID = 1L;


    /**
     * id
     */
    @TableId(value = "resource_id", type = IdType.AUTO)
    @ApiModelProperty(value="id")
    private Long resourceId;
    private Long type;

    /**
     * 资源名称
     */
    @ApiModelProperty(value="资源名称")
    private String resourceName;

    /**
     * 作者
     */
    @ApiModelProperty(value="作者")
    private String author;

    /**
     * 简介
     */
    @ApiModelProperty(value="简介")
    private String briefIntroduction;

    /**
     * 出版社
     */
    @ApiModelProperty(value="出版社")
    private String press;

    /**
     * 大类id
     */
    @ApiModelProperty(value="大类id")
    private Long dataTypeId;

    /**
     * 中图法id
     */
    @ApiModelProperty(value="中图法id")
    private Long bookTypeId;

    /**
     * 浏览量
     */
    @ApiModelProperty(value="浏览量")
    private Long pageView;
    @ApiModelProperty(value="封面")
    private String cover;
    @ApiModelProperty(value="状态")
    private String status;

    @ApiModelProperty(value="创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value="总字数")
    private Long totalWords;

    @ApiModelProperty(value="出版时间")
    private Date publishTime;

    @ApiModelProperty(value = "是否推荐")
    private Integer sfRecommend;

    @ApiModelProperty(value = "点赞数量")
    private Integer likeCount;

    @ApiModelProperty(value = "是否点赞 0-否 1-是")
    private Integer sfLike;

    @ApiModelProperty(value = "是否收藏 0-否 1-是")
    private Integer sfCollect;

    @TableField(exist = false)
    private Long collectId;

    @ApiModelProperty(value="状态")
    private String secondType;

    @ApiModelProperty(value="状态")
    private String source;

    @ApiModelProperty(value="资源审核id")
    private Long resourceAuditId;
}

